import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class SVG {
  static icon(String name, {color = Colors.black, double size = 16}) {
    return SvgPicture.asset(
      'assets/svgs/icon/$name.svg',
      color: color,
      width: size,
      height: size,
      matchTextDirection: true,
    );
  }

  static svg(String name, {double size = 16, double width, double height}) {
    if (width == null || height == null) {
      width = size;
      height = size;
    }
    return Container(
        child: SvgPicture.asset('assets/svgs/svg/$name.svg',
            width: width, height: height, allowDrawingOutsideViewBox: true
            // matchTextDirection: true,
            ));
  }
}
